package org.zjblague.blog.dao;

import java.util.List;

import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;
import javax.jdo.Query;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.zjblague.blog.model.Tag;

@Repository
public class TagDAO {

	private static final Logger LOG = LoggerFactory.getLogger(TagDAO.class);
	
	
	PersistenceManager pm;
	
	/**
	 * @param persistenceManagerFactory the persistenceManagerFactory to set
	 */
	@Autowired
	public void setPersistenceManagerFactory(
			PersistenceManagerFactory persistenceManagerFactory) {
		this.pm = persistenceManagerFactory.getPersistenceManager();
	}

	public void delete(Tag entity) {
		// TODO Auto-generated method stub

	}

	public void save(Tag entity) {
		// TODO Auto-generated method stub
		LOG.info("TagDAO.add()");
		pm.makePersistent(entity);
		
	}

	public void update(Tag entity) {
		// TODO Auto-generated method stub

	}

	public List<Tag> findList(Query query, String str) {
		// TODO Auto-generated method stub
		return null;
	}

}
